tests: Include system headers appropriately
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 21 Jul 2017 08:00:44 +0000 (16:00 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 21 Jul 2017 15:36:03 +0000 (23:36 +0800)
Don't include unistd.h on Windows, and include the appropriate headers on
Windows as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=773299

tests/testanimation.c
testsuite/a11y/accessibility-dump.c
testsuite/css/nodes/test-css-nodes.c
testsuite/css/parser/test-css-parser.c
testsuite/css/style/test-css-style.c
testsuite/reftests/gtk-reftest.c

index 45f4602f3d2066e27438fc199d68ae73588195cc..8190be9e86f1b387305facc3cf76e833d77e1ce4 100644 (file)
 #include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <string.h>
 #include <errno.h>
 #include <gtk/gtk.h>
 
+#ifndef G_OS_WIN32
+# include <unistd.h>
+#endif
+
 typedef struct _LoadContext LoadContext;
 
 struct _LoadContext
index eb90477ad07f462bba129dbb5a93074f19cf04a2..5f848fb96a54d445b0e2fc51e5de164cf5894688 100644 (file)
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 
+#ifdef G_OS_WIN32
+# include <io.h>
+#endif
+
 #define DEPTH_INCREMENT 2
 
 static char *
index bb0b02cc483dd1fdda7e357bce41aaa707bba26d..334b60a11c191327ab0c565d3832af4efa75d812 100644 (file)
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 
+#ifdef G_OS_WIN32
+# include <io.h>
+#endif
+
 
 static char *
 test_get_reference_file (const char *ui_file)
index ff6340986c28ecc3febedce24d4f28d7993c0ace..f79c5804213c55e47f9c4d3f9ea7ab0d7a9bef74 100644 (file)
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 
+#ifdef G_OS_WIN32
+# include <io.h>
+#endif
+
 static char *
 test_get_reference_file (const char *css_file)
 {
index 130132af26240984a24f94c882493490ee65dad4..4555db1926775e8e26ba569fdfb16d6d0d549ff5 100644 (file)
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 
+#ifdef G_OS_WIN32
+# include <io.h>
+#endif
+
 /* There shall be no other styles */
 #define GTK_STYLE_PROVIDER_PRIORITY_FORCE G_MAXUINT
 
index d8d82d695d046095be9290ff6ce885dfdfddf3bf..758007a12a85c95936016c18a9015b29ac8dc8f3 100644 (file)
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 
+#ifdef G_OS_WIN32
+# include <direct.h>
+#endif
+
 typedef enum {
   SNAPSHOT_WINDOW,
   SNAPSHOT_DRAW